<!DOCTYPE html>
<html>
    <head>
        <title><g:layoutTitle default="Livraria Campinense" /></title>
        <link rel="stylesheet" href="${resource(dir:'css',file:'main.css')}" />
        <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
        <g:layoutHead />
        <g:javascript library="application" />
    </head>
    <body>
      <div id="loginHeader">
          <g:loginControl />
      </div>
        <div id="logo"><center><img src="${resource(dir:'images',file:'logo_lc.png')}" alt="Logo LC" border="0" /></center></div>

        <div class="nav">
        <div class="table">
            <ul class="select"><li><a href="${createLink(uri: '/index.gsp')}"><b>Página Inicial</b></a>
            </li>
            </ul>
            <ul class="select"><li><a href="" target="_self"><b>Cadastros</b></a>
            <div class="select_sub">
            <ul class="sub">
            <li><g:link action="create" controller="cliente">Cadastrar Cliente</g:link></li>
            <li><g:link action="create" controller="livro">Cadastrar Livro</g:link></li>
            <li><g:link action="create" controller="editora">Cadastrar Editora</g:link></li>
            <g:if test="${session.user.ehAdmin}">
              <li><g:link action="create" controller="usuario">Cadastrar Usuário</g:link></li>
            </g:if>
            
            </ul>
            </div>
            </li>
            </ul>
            <ul class="select"><li><a href="" target="_self"><b>Consultas</b></a>
            <div class="select_sub">
            <ul class="sub">
            <li><g:link action="list" controller="cliente">Listar Clientes</g:link></li>
            <li><g:link action="list" controller="livro">Listar Livros</g:link></li>
            <li><g:link action="list" controller="editora">Listar Editoras</g:link></li>
            <li><g:link action="list" controller="usuario">Listar Usuários</g:link></li>
            </ul>
            </div>
            </li>
            </ul>
            <ul class="select"><li><a href="" target="_self"><b>Vendas</b></a>
            <div class="select_sub">
            <ul class="sub">
            <li><g:link action="create" controller="venda">Nova Venda</g:link></li>
            <li><g:link action="list" controller="venda">Histórico de Vendas</g:link></li>
            </ul>
            </div>
            </li>
            </ul>
            <ul class="select"><li><a href="" target="_self"><b>Pesquisar</b></a>
            <div class="select_sub">
            <ul class="sub">
            <li><a href="${createLink(uri: '/pesquisa/pesquisarLivroPorAutor.gsp')}">por Autor</a></li>
            <li><a href="${createLink(uri: '/pesquisa/pesquisarLivroPorTitulo.gsp')}">por Título</a></li>
            </ul>
            </div>
            </li>
            </ul>
            <ul class="select"><li><a href="${createLink(uri: '/ajuda.gsp')}"><b>Ajuda</b></a>
            </li>
            </ul>
        </div>
        </div>

        <g:layoutBody />
            </body>
        </html>